]> dgit.raspbian.org Git - gnome-shell.git/commit
shell-util: Only use systemd if gnome-shell is managed by systemd
authorSebastian Wick <sebastian.wick@redhat.com>
Tue, 16 Apr 2024 14:29:48 +0000 (16:29 +0200)
committerMarge Bot <marge-bot@gnome.org>
Mon, 22 Apr 2024 23:11:06 +0000 (23:11 +0000)
commitb3580919e3982477461e8918698a98788fabe353
tree98095813ce642769236f28fff5c6ef69fdbfb765
parent3b7028ea7fb380307f399f943fc9a92743194d92
shell-util: Only use systemd if gnome-shell is managed by systemd

Simply looking at the return value of sd_pid_get_user_unit can be used
to determine if the process is in a systemd unit, but it doesn't say if
gnome-shell is managed by systemd.

For example, running toolbx on a host with systemd creates a libpod
unit, even if the gnome-shell that gets started in the toolbx is itself
not managed by systemd.

We can make sure that gnome-shell is managed by systemd simply by
checking if the unit we're running starts with org.gnome.Shell.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3267>
src/shell-util.c